Repository navigation
fix(milestones): allow deallocate while paused — it's a reclaim path - #607
Open
yggdrasilworld wants to merge 2 commits into
Open
yggdrasilworld wants to merge 2 commits into
yggdrasilworld wants to merge 2 commits into
Conversation
deallocate was pause-gated like a spend operation, but it only moves an
allocated amount back toward remaining_budget (recoverable via
cancel_milestone) — a sponsor-protective refund path. During a pause,
allocated-but-unreleased sponsor funds were trapped, which violates the
pause design's first principle ('a paused contract must still allow
sponsor-protective refund/reclaim paths').
Remove the is_paused gate on deallocate, document why it's allowed while
paused, and update the regression test to assert deallocate succeeds
during a pause and returns the allocation to remaining_budget.
Resolves MergeFi#530
Note: not locally compiled — the workspace pins rustc 1.95 + wasm32v1-
none (not installable here); flagging for CI verification.
|
Someone is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
deallocatewas pause-gated like a spend operation — but it only moves an allocated amount back towardremaining_budget(recoverable viacancel_milestone). It's a sponsor-protective reclaim path, and blocking it during a pause trapped allocated-but-unreleased sponsor funds — violating the pause design's first principle ("a paused contract must still allow sponsor-protective refund/reclaim paths").The fix
is_pausedgate ondeallocate— it's a reclaim direction, not a spendtest_deallocate_blocked_while_paused→test_deallocate_allowed_while_paused— asserts deallocate succeeds during a pause, returns the allocation toremaining_budget, and clears the issue-statusHonest caveat
Not locally compiled — the workspace pins
rustc 1.95+wasm32v1-none(not installable in this environment). The change is minimal and the semantics are correct (deallocate's refund-pathrefund_remaining_budgetis itself ungated, consistent with the reclaim model), but please let CI verify the build.Resolves #530
Payment: Base USDC
0xD40Df5c27cEa7dd78A3c345401995c319589334e